/**
 * 
 */
package cyclopean.world.actor;

import cyclopean.world.zone.Position;

// TODO Javadoc
/**
 * 
 *
 * @author Jaco van der Westhuizen
 */
public abstract class Actor
{
	// TODO Add graphics model

	protected final float mobility;

    public final Position pos;
	protected float velX = 0;
	protected float velY = 0;
    protected float velZ = 0;

	protected Actor(Position pos, float mobility)
	{
		this.pos = new Position(pos);
		this.mobility = mobility;
	}

	public void update()
	{
	    pos.move(velX, velY, velZ);
	}

	public void applyBodyForce(float fx, float fy, float fz)
	{
	    if (mobility == 0)
	        return;

	    velX += mobility * fx;
        velY += mobility * fy;
        velZ += mobility * fz;
	}
}
